<template>
  <div>
    <el-table :data="gameareatable" >
        <el-table-column
                type="index"
                width="70px">
        </el-table-column>
        <el-table-column  align="center" v-for="(item,index) in activePlayerDataPropLabelArray" :prop="item" :label="item"
                         :key="item">
            <template slot-scope="scope">
                {{scope.row[item]?scope.row[item]:'暂无数据'}}
            </template>
        </el-table-column>
    </el-table>
    <el-button type="primary" @click="getForm" style="text-align: center; margin-top: 30px; margin-left: 46%">获取结果</el-button>
  </div>
</template>

<script>
    export default {
        name: "Show",
        data() {
            return{
                now: {
                    MAE:"1",
                    MAPE:"1",
                    MSE:"1",
                    RMSE:"",
                    masked_MAE:"",
                    masked_MSE:"",
                    masked_RMSE:"",
                    masked_MAPE :"",
                    R2:"",
                    EVAR:""
                },
                activePlayerDataPropLabelArray:['MAE',
                    'MAPE',
                    'MSE',
                    'RMSE',
                    'masked_MSE',
                    'masked_RMSE',
                    'R2',
                    'EVAR',
                ],
                gameareatable:[
                ]
            }
        },
      methods: {
        getForm() {
            this.$axios.get(`/user/${this.$route.query.userId}/${this.$route.query.modelId}/show`).then(res => {
              console.log("ok")
              this.activePlayerDataPropLabelArray = res.data.data.activePlayerDataPropLabelArray
              this.gameareatable = res.data.data.gameareatable

            })
          }
        }
    }


</script>

<style scoped>

</style>

